package com.swx.identityservice.service.impl;


import com.swx.identityservice.mapper.ScbpPermissionMapper;
import com.swx.identityservice.models.ScbpPermission;
import com.swx.identityservice.service.ScbpPermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Administrator
 * @version V1.0.0
 * @date 2018/6/3 0003 0:31
 */
@Service
public class ScbpPermissionServiceImpl extends CrudServiceImpl<ScbpPermission> implements ScbpPermissionService {

    @Autowired
    private ScbpPermissionMapper scbpPermissionMapper;

    @Override
    public List<ScbpPermission> getPermissionsAsTree(Object key) throws Exception {
        return scbpPermissionMapper.getPermissionsAsTree(key);
    }

    @Override
    public List<ScbpPermission> getAllPermissions() throws Exception {
        return scbpPermissionMapper.getAllPermissions();
    }

    @Override
    public ScbpPermission selectParentExist(String name) {
        return scbpPermissionMapper.selectParentExist(name);
    }
}
